<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateMovieBaseInfosTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('movie_base_infos', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('image')->nullable()->comment('图片地址');
            $table->string('douban_id')->nullable()->comment('豆瓣唯一 ID');
            $table->string('name')->nullable()->comment('中文名称');
            $table->boolean('is_crawler')->default(false)->comment('是否采集');
            $table->integer('crawler_count')->default(0)->unsigned()->comment('采集次数');
            $table->boolean('is_oss_crawler')->default(false)->comment('是否下载到了 OSS');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('movie_base_infos');
    }
}
